package business_opportunity

type CustomerGroupListItem struct {
	Id          int64  `json:"id"`
	Title       string `json:"title"`
	FileId      string `json:"file_id"`
	FileUrl     string `json:"file_url"`
	CreatedBy   string `json:"created_by"`
	CreatedOn   string `json:"created_on"`
	Total       int64  `json:"total"`
	Status      int32  `json:"status"`
	TenantCodes string `json:"tenant_codes"`
	IsPublic    int32  `json:"is_public"`
}

type SaveCustomerGroupRequest struct {
	Id              int64    `json:"id"`
	Title           string   `json:"title" binding:"max=40,required" err:"标题长度最高40"`
	LandUsage       string   `json:"land_usage"`
	LandUsageOp     int32    `json:"land_usage_op" binding:"oneof=1 2" err:"非法的操作关系符"`
	LandTitle       string   `json:"land_title"`
	LandTitleOp     int32    `json:"land_title_op" binding:"oneof=1 2" err:"非法的操作关系符"`
	BuildingType    string   `json:"building_type"`
	BuildingTypeOp  int32    `json:"building_type_op" binding:"oneof=1 2" err:"非法的操作关系符"`
	BuildingTitle   string   `json:"building_title"`
	BuildingTitleOp int32    `json:"building_title_op" binding:"oneof=1 2" err:"非法的操作关系符"`
	BidTitle        string   `json:"bid_title"`
	BidTitleOp      int32    `json:"bid_title_op" binding:"oneof=1 2" err:"非法的操作关系符"`
	WinbidTitle     string   `json:"winbid_title"`
	WinbidTitleOp   int32    `json:"winbid_title_op" binding:"oneof=1 2" err:"非法的操作关系符"`
	FileId          string   `json:"file_id"`
	TenantCodes     []string `json:"tenant_codes" binding:"required" err:"租户信息为必填项"`
	IsPublic        int32    `json:"is_public"`
	CreatedBy       string   `json:"created_by"`
}

type SaveCustomerGroupResponse struct {
	Id int64 `json:"id"`
}

type GetCustomerGroupDetailRequest struct {
	Id int64 `form:"id" binding:"required"`
}

type GetCustomerGroupDetailResponse struct {
	Id              int64    `json:"id"`
	Title           string   `json:"title"`
	LandUsage       string   `json:"land_usage"`
	LandUsageOp     int32    `json:"land_usage_op"`
	LandTitle       string   `json:"land_title"`
	LandTitleOp     int32    `json:"land_title_op"`
	BuildingType    string   `json:"building_type"`
	BuildingTypeOp  int32    `json:"building_type_op"`
	BuildingTitle   string   `json:"building_title"`
	BuildingTitleOp int32    `json:"building_title_op"`
	BidTitle        string   `json:"bid_title"`
	BidTitleOp      int32    `json:"bid_title_op" `
	WinbidTitle     string   `json:"winbid_title"`
	WinbidTitleOp   int32    `json:"winbid_title_op"`
	FileId          string   `json:"file_id"`
	FileUrl         string   `json:"file_url"`
	IsPublic        int32    `json:"is_public"`
	TenantCodes     []string `json:"tenant_codes"`
}

type GetCustomerGroupListRequest struct {
	Page       int32  `form:"page" binding:"required,min=1,max=10000" err:"页码格式错误"`
	PageSize   int32  `form:"page_size" binding:"required,min=1,max=500" `
	Status     int32  `form:"status"`
	TenantCode string `form:"tenant_code"`
}

type GetCustomerGroupListResponse struct {
	Total int32                   `json:"total"`
	List  []CustomerGroupListItem `json:"list"`
}

type DeleteCustomerGroupRequest struct {
	Id int64 `json:"id" binding:"required" err:"Id 是必填项"`
}

type DeleteCustomerGroupResponse struct {
	AffectedRows int32 `json:"affected_rows"`
}
